<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  onLaunch: function() {
    console.log('App Launch')
    // 应用启动时进行静默登录
    this.$store.dispatch('silentLogin').then(() => {
      console.log('静默登录成功')
    }).catch(() => {
      console.log('静默登录失败，可能需要用户授权')
    })
  },
  onShow: function() {
    console.log('App Show')
  },
  onHide: function() {
    console.log('App Hide')
  }
}
</script>

<style>
/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f5;
}

button {
  border-radius: 8px;
}
</style>